import { http } from "@/utils/http";
import { baseUrlApi } from "@/api/utils";
/*服务分类 -列表*/
export const queryCategoryList = (params?) => {
  return http.request("get", baseUrlApi("serviceCategory/categoryList"), {
    params
  });
};
/*服务分类-添加*/
export const addCategory = async (data?: object) => {
  return http.request("post", baseUrlApi("serviceCategory/add"), { data });
};
/*服务分类-删除*/
export const deleteCategory = (params?) => {
  return http.request("get", baseUrlApi("serviceCategory/delete"), { params });
};
/*服务分类-修改*/
export const updateCategory = async (data?: object) => {
  return http.request("post", baseUrlApi("serviceCategory/update"), { data });
};

/*服务项目-列表*/
export const queryServiceGoodseList = (params?) => {
  return http.request("get", baseUrlApi("serviceGoods/serviceGoodsList"), {
    params
  });
};
/*服务项目-添加*/
export const addServiceGoods = async (data?: object) => {
  return http.request("post", baseUrlApi("serviceGoods/add"), { data });
};
/*服务项目-上架*/
export const shelfServiceGoods = (params?) => {
  return http.request("get", baseUrlApi("serviceGoods/shelf"), { params });
};
/*服务项目-下架*/
export const unshelfServiceGoods = (params?) => {
  return http.request("get", baseUrlApi("serviceGoods/unshelf"), { params });
};
/*服务项目-修改*/
export const updateServiceGoods = async (data?: object) => {
  return http.request("post", baseUrlApi("serviceGoods/update"), { data });
};
/*服务项目-删除*/
export const deleteServiceGoods = (params?) => {
  return http.request("get", baseUrlApi("serviceGoods/delete"), { params });
};
